<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录与注册</title>
    <!-- 引入 Bootstrap CSS -->
    <link rel="icon" type="image/png" href="./img/favicon.png">
    <link href="/css/bootstrap.min.css" type="text/css" rel="stylesheet">
    <link href="css/Toast.css" type="text/css" rel="stylesheet">

    <style>
        body {
            background-color: #f8f9fa;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        .container {
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            max-width: 400px;
            width: 100%;
        }

        .form-title {
            text-align: center;
            margin-bottom: 20px;
        }

        .error {
            color: red;
            font-size: 14px;
            margin-top: 5px;
        }

        .table {
            margin-top: 20px;
        }


    </style>
</head>
<body>
<!-- Toast 提示 -->
<div class="toast-container">
    <div id="toast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
        <div class="toast-header">
            <strong class="me-auto">提示</strong>
            <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
        </div>
        <div class="toast-body"></div>
    </div>
</div>

<div class="container" id="login-container">
    <h2 class="form-title">登录</h2>
    <form id="login-form">
        <div class="mb-3">
            <label for="login-username-email" class="form-label">用户名或邮箱</label>
            <input type="text" class="form-control" id="login-username-email" required>
        </div>
        <div class="mb-3">
            <label for="login-password" class="form-label">密码</label>
            <input type="password" class="form-control" id="login-password" required>
        </div>
        <button type="submit" class="btn btn-primary w-100">登录</button>
    </form>
    <p class="mt-3 text-center">还没有账号？<a href="#" id="switch-to-register">注册</a></p>
</div>

<div class="container" id="register-container" style="display: none;">
    <h2 class="form-title">注册</h2>
    <form id="register-form">
        <div class="mb-3">
            <label for="register-username" class="form-label">用户名</label>
            <input type="text" class="form-control" id="register-username" required>
        </div>
        <div class="mb-3">
            <label for="register-email" class="form-label">邮箱</label>
            <input type="email" class="form-control" id="register-email" required>
        </div>
        <div class="mb-3">
            <label for="register-password" class="form-label">密码</label>
            <input type="password" class="form-control" id="register-password" required>
        </div>
        <div class="mb-3">
            <label for="register-confirm-password" class="form-label">确认密码</label>
            <input type="password" class="form-control" id="register-confirm-password" required>
        </div>
        <div class="error" id="password-error"></div>
        <button type="submit" class="btn btn-success w-100">注册</button>
    </form>
    <p class="mt-3 text-center">已有账号？<a href="#" id="switch-to-login">登录</a></p>



</div>

<!-- 引入 Bootstrap JS 和依赖 -->
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/axios.min.js"></script>
<script src="js/login/addDocumentClick.js" type="module"></script>

</body>
</html>